package com.snap.vseries.bean;

import io.protostuff.Tag;

/**
 * 中间数据：拥有多个节的段的信息
 */
public class ProgramRecycle {
    /**
     * 节起点,从1开始
     */
    int startIndex;
    int endIndex;
    int cycleCount;
    /**
     * 表示进行采光操作，false反之
     */
    @Deprecated
    @Tag(3)
    private boolean lighting;

    /**
     * 采光节点,取值范围[startIndex,endIndex]
     */
    private int lightingIndex;

    /**
     * 构建一个段信息（一个段有n节，n>1）
     *
     * @param startIndex 节起点,从1开始
     * @param endIndex   节终点
     * @param cycleCount 循环次数
     */
    public ProgramRecycle(int startIndex, int endIndex, int cycleCount, boolean lighting) {
        this.startIndex = startIndex;
        this.endIndex = endIndex;
        this.cycleCount = cycleCount;
        this.lighting = lighting;
    }

    /**
     * 构建一个段信息（一个段有n节，n>1）
     *
     * @param startIndex 节起点,从1开始
     * @param endIndex   节终点
     * @param cycleCount 循环次数
     */
    public ProgramRecycle(int startIndex, int endIndex, int cycleCount, boolean lighting, int lightingIndex) {
        this.startIndex = startIndex;
        this.endIndex = endIndex;
        this.cycleCount = cycleCount;
        this.lighting = lighting;
        this.lightingIndex = lightingIndex;

    }

    public int getLightingIndex() {
        return lightingIndex;
    }

    public void setLightingIndex(int lightingIndex) {
        this.lightingIndex = lightingIndex;
    }

    public boolean isLighting() {
        return lighting;
    }

    public void setLighting(boolean lighting) {
        this.lighting = lighting;
    }

    public int getStartIndex() {
        return startIndex;
    }

    public void setStartIndex(int startIndex) {
        this.startIndex = startIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public void setEndIndex(int endIndex) {
        this.endIndex = endIndex;
    }

    public int getCycleCount() {
        return cycleCount;
    }

    public void setCycleCount(int cycleCount) {
        this.cycleCount = cycleCount;
    }
}
